package com.tz.entity;

import java.util.List;

/**
 * Created by Tinyang on 2016/7/25.
 */
public class Cart {
    private long id;
    private User user;
    private List<Commodity> commodities;
    private double totalPrice;

    public Cart() {
    }


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<Commodity> getCommodities() {
        return commodities;
    }

    public void setCommodities(List<Commodity> commodities) {
        this.commodities = commodities;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Cart{");
        sb.append("id=").append(id);
        sb.append(", user=").append(user);
        sb.append(", commodities=").append(commodities);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append('}');
        return sb.toString();
    }
}
